package com.ctbu.tourism.utils;import java.util.Random;/** * @author wanglinli * at 18-4-3 下午2:16 * 注释:邮箱激活码 */public class RandomCodeUtil {    //生成8位数的 字母 大小随机 当做授权码    public static String getRandomCode(){        Random r = new Random();        String code = "";        for (int i = 0; i < 4; ++i) {            int temp = r.nextInt(52);            char x = (char) (temp < 26 ? temp + 97 : (temp % 26) + 65);            code += x;        }        return code;    }}